Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Adding Controller Framework that is used by Controller and Provisione… #5

Merged

Conversation

brahmaroutu
Copy link
Contributor

…r as common code

Adding controller basic code that is used by other packages/repos.

assign @wlan0

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 23, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brahmaroutu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 23, 2020
@wlan0
Copy link
Contributor

wlan0 commented Nov 23, 2020

The post build step for the previous commit failed: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/post-container-object-storage-interface-api-push-images/1330951515501760512

2020/11/23 19:09:08 /home/prow/go/src/github.com/kubernetes-sigs/container-object-storage-interface-api/cloudbuild.yaml does not exist

Could you look into it please

c.locker = map[string]*sync.Mutex{}
}
if _, ok := c.locker[lockKey]; !ok {
c.lockerLock.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to acquire this lock outside the if-condition. When there are multiple requests for the same key (that does not exist yet), they could race and lead to concurrent map access panic.

This should be outside the if-block

c.lockerLock.Lock()
defer c.lockerLock.Unlock()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@wlan0 wlan0 self-assigned this Nov 23, 2020
@brahmaroutu
Copy link
Contributor Author

@wlan the post trigger logic will be only for builds that need to push built images, this repo does not need one.

@wlan0
Copy link
Contributor

wlan0 commented Nov 23, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2020
@k8s-ci-robot k8s-ci-robot merged commit 7e8acfc into kubernetes-retired:master Nov 23, 2020
BlaineEXE pushed a commit to BlaineEXE/cosi-api that referenced this pull request May 29, 2024
…se_tools

We maintain release tools only under Spec repo
shanduur pushed a commit to shanduur/container-object-storage-interface-api that referenced this pull request Jun 6, 2024
…se_tools

We maintain release tools only under Spec repo
BlaineEXE pushed a commit to BlaineEXE/cosi-api that referenced this pull request Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants